<html>
<head><meta charset="utf-8"><title>__morestack error when building librustc_driver · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html">__morestack error when building librustc_driver</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218049688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/218049688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#218049688">(Nov 27 2020 at 01:23)</a>:</h4>
<p>Has anyone ever seen this error before?</p>



<a name="218049696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/218049696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#218049696">(Nov 27 2020 at 01:24)</a>:</h4>
<div class="codehilite"><pre><span></span><code>  = note: /usr/sbin/ld: /home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-11-rust-dev.so: __morestack: invalid needed version 2
          /usr/sbin/ld: /home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-11-rust-dev.so: error adding symbols: bad value
          collect2: error: ld returned 1 exit status
</code></pre></div>



<a name="218049730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/218049730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#218049730">(Nov 27 2020 at 01:24)</a>:</h4>
<p>it started when I enabled the <code>WebAssembly</code> target for LLVM</p>



<a name="218049734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/218049734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#218049734">(Nov 27 2020 at 01:24)</a>:</h4>
<p>it happens when bootstrap tries to build the stage0 rustc_driver</p>



<a name="224264366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224264366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224264366">(Jan 27 2021 at 23:31)</a>:</h4>
<p><span class="user-mention" data-user-id="125294">@Aaron Hill</span> did you figure this out? <span class="user-mention" data-user-id="133224">@Nikita Popov</span> hit the same error in <a href="https://github.com/rust-lang/rust/issues/81451">#81451</a>.</p>



<a name="224264630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224264630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224264630">(Jan 27 2021 at 23:34)</a>:</h4>
<p>I had modified my <code>config.toml</code> to use my system clang as the C compiler</p>



<a name="224264643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224264643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224264643">(Jan 27 2021 at 23:34)</a>:</h4>
<p>I commented out those lines, and the error went away</p>



<a name="224264701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224264701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224264701">(Jan 27 2021 at 23:35)</a>:</h4>
<p>I never actually found out what the root cause was</p>



<a name="224264756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224264756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224264756">(Jan 27 2021 at 23:35)</a>:</h4>
<p>this PR is attempting to update clang 10 to 11</p>



<a name="224613992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224613992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224613992">(Jan 31 2021 at 00:40)</a>:</h4>
<p>(Or rather, whatever it is now to LLVM 12.)</p>



<a name="224622934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224622934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224622934">(Jan 31 2021 at 05:01)</a>:</h4>
<p>No, I said it correctly. This is about the compiler we use to build rustc and its LLVM. The dist-x86_64 builder was using clang-10 and updated to clang-11, as part of the PR bumping rustc to LLVM 12.</p>



<a name="224623025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224623025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224623025">(Jan 31 2021 at 05:02)</a>:</h4>
<p>Most of the other builders just use GCC, but that one builds LLVM with ThinLTO.</p>



<a name="224623357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224623357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224623357">(Jan 31 2021 at 05:09)</a>:</h4>
<p>(oh, but that clang upgrade was then split to a different pr, so it's not there now)</p>



<a name="224623438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224623438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224623438">(Jan 31 2021 at 05:11)</a>:</h4>
<p>(and then that was reverted because <code>__morestack</code> still caused issues)</p>



<a name="224676104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224676104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224676104">(Feb 01 2021 at 01:07)</a>:</h4>
<p>Okay, I'm confused <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="224683836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/__morestack%20error%20when%20building%20librustc_driver/near/224683836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/__morestack.20error.20when.20building.20librustc_driver.html#224683836">(Feb 01 2021 at 04:04)</a>:</h4>
<p>I mean, yeah, we don't really know why this broke, so I'm confused too.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>